package com.example.project.projectspringcloud.entity.user;

import com.example.project.projectspringcloud.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class Comment extends BaseEntity {

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论配图
     */
    private String image;

    /**
     * 评论目标
     */
    private Integer target;

    /**
     * 评论目标类型 1. 人 2. 作品 3. 订单
     */
    private Integer targetType;

    /**
     * 评论者
     */
    private User user;

    /**
     * 该评论对应评价
     */
    private Evaluate evaluate;

    public Comment() {

    }

    public Comment(Integer target, Integer targetType) {
        this.target = target;
        this.targetType = targetType;
    }
}